<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
	<input type="file" name="photo" id="photo" value="" placeholder="免冠照片" />
	<input type="button" onclick="postData();" value="下一步" name=""
		style="width: 100px; height: 30px;" />
</body>
<script type="text/javascript">
	/* $(function(){
	 alert(123);
	 }) */

	function postData() {
		var formData = new FormData();
		formData.append("photo", $("#photo")[0].files[0]);
		/*  formData.append("service",'App.Passion.UploadFile');
		 formData.append("token",token); */
		$.ajax({
			url : '../Upload', /*接口域名地址*/
			type : 'post',
			data : formData,
			contentType : false,
			processData : false,
			success : function(res) {
				console.log(res);
				/* if (res.data["code"] == "succ") {
					alert('成功');
				} else if (res.data["code"] == "err") {
					alert('失败');
				} else {
					console.log(res);
				} */
			}
		})
	}
</script>

</html>